package com.prs.crm.domain.fs;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.purchase.FundsInBar;
import com.prs.crm.domain.purchase.PaymentDetails;
import com.prs.crm.domain.sale.SalesReceivesRegist;
import com.prs.crm.domain.sale.SalesReceivesRegistBillReality;

@SuppressWarnings("serial")
@Entity
@Table(name = "fs_detail")
public class Detail extends BaseEntity {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@ManyToOne
	private BankAccount bankAccount;
	private Double income;
	private Double pay;
	private Double balance;
	private String item;
	private String summary;

	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private DirectEntry directEntry;
	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private TransferAccount transfer;
	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private SalarySettle salarySettle;
	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Outlay outlay;
	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private OutlayReturn outlayReturn;
	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private OutlayApply outlayApply;

	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private SalesReceivesRegist salesReceivesRegist;

	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private SalesReceivesRegistBillReality salesReceivesRegistBillReality;

	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private PaymentDetails paymentDetails;

	@OneToOne
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private FundsInBar fundsInBar;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public BankAccount getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(BankAccount bankAccount) {
		this.bankAccount = bankAccount;
	}

	public Double getIncome() {
		return income;
	}

	public void setIncome(Double income) {
		this.income = income;
	}

	public Double getPay() {
		return pay;
	}

	public void setPay(Double pay) {
		this.pay = pay;
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}

	public String getItem() {
		return item;
	}

	public void setItem(String item) {
		this.item = item;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public DirectEntry getDirectEntry() {
		return directEntry;
	}

	public void setDirectEntry(DirectEntry directEntry) {
		this.directEntry = directEntry;
	}

	public void setTransfer(TransferAccount transfer) {
		this.transfer = transfer;
	}

	public TransferAccount getTransfer() {
		return transfer;
	}

	public void setSalarySettle(SalarySettle salarySettle) {
		this.salarySettle = salarySettle;
	}

	public SalarySettle getSalarySettle() {
		return salarySettle;
	}

	public void setOutlay(Outlay outlay) {
		this.outlay = outlay;
	}

	public Outlay getOutlay() {
		return outlay;
	}

	public void setOutlayReturn(OutlayReturn outlayReturn) {
		this.outlayReturn = outlayReturn;
	}

	public OutlayReturn getOutlayReturn() {
		return outlayReturn;
	}

	public void setOutlayApply(OutlayApply outlayApply) {
		this.outlayApply = outlayApply;
	}

	public OutlayApply getOutlayApply() {
		return outlayApply;
	}

	public SalesReceivesRegist getSalesReceivesRegist() {
		return salesReceivesRegist;
	}

	public void setSalesReceivesRegist(SalesReceivesRegist salesReceivesRegist) {
		this.salesReceivesRegist = salesReceivesRegist;
	}

	public SalesReceivesRegistBillReality getSalesReceivesRegistBillReality() {
		return salesReceivesRegistBillReality;
	}

	public void setSalesReceivesRegistBillReality(
			SalesReceivesRegistBillReality salesReceivesRegistBillReality) {
		this.salesReceivesRegistBillReality = salesReceivesRegistBillReality;
	}

	public PaymentDetails getPaymentDetails() {
		return paymentDetails;
	}

	public void setPaymentDetails(PaymentDetails paymentDetails) {
		this.paymentDetails = paymentDetails;
	}

	public FundsInBar getFundsInBar() {
		return fundsInBar;
	}

	public void setFundsInBar(FundsInBar fundsInBar) {
		this.fundsInBar = fundsInBar;
	}

}
